The present invention relates to an image reading device and an image reading method for reading an image to be picked up using a line sensor.
An electronic-part mounting device uses a line sensor as an image pickup means for recognizing positions of electronic parts by image processing. The line sensor comprises pixels having a photoelectric transfer element for storing a charge corresponding to a received light amount and a transmission unit for receiving the charge from the pixels and outputting it as an electric signal. The pixels and the transmission unit are arranged in a line shape. When an optical system forms an optical image of a pickup object on the line sensor, each pixel stores a charge corresponding to the pickup object.
The transmission unit receives the charges from pixels and outputs them sequentially as electric signals to provide one-dimensional image data in the arrangement direction of the photoelectric transfer elements, namely in a main scan direction. A plurality of one-dimensional image data obtained by relatively moving an electronic part in a sub scan direction orthogonal to the main scan direction are arranged in parallel. A desired two-dimensional image data is thus provided. As the line sensor, a CCD line sensor is conventionally used.
There are many kinds of electronic parts having different size. A multifunctional electronic-part mounting device for such many kinds of electronic parts having different size must pick up images of the electronic parts with one image reading device. An image reading device using a line sensor generally often includes a line sensor with a scan width corresponding to a size of the largest electronic part, among electronic parts to be scanned.
The CCD line sensor used for the conventional image reading device must transmit charges from all pixels in the line sensor during the image reading independently of size of an object. Therefore, charges are also transmitted from an unnecessary range of pixels that do not include required information, and excessive time is required for reading an image.
The present invention provides image reading device and method that can drastically reduce an image reading time and improve image recognition efficiency, and a recording medium for an image reading program.
The image reading device in accordance with the present invention comprises a line sensor, a pixel selector, a relatively moving mechanism, an image pickup area storage, an image storage, an image output controller, and a storage controller. A plurality of pixels having a photoelectric transfer element are arranged in series in the X-direction in the line sensor. The pixel selector selects one of the pixels, and outputs an image signal through the selected pixel. The relatively moving mechanism moves the line sensor relatively to an image pickup object, at least in the Y-direction crossing the X-direction. The image pickup area storage stores X-directional numerical values and Y-directional numerical values for a size of an area picked up by the line sensor. The image storage stores the image signal supplied from the line sensor. The image output controller controls the pixel selection by the pixel selector based on the X-directional numerical values. The storage controller controls writing of the image signal into the image storage based on the Y-directional numerical values and positional information in the relatively moving mechanism.